package db_opera

import (
	"AlgorithmPractice/src/common/comm_entity/db_entity"
	"context"
	"gorm.io/gorm"
)

/**
 * @author 蔚蔚樱
 * @version V1.0
 * @date 2023/5/10 01:20
 * @author-Email micromicrohard@outlook.com
 * @blogURL https://blog.csdn.net/Micro_Micro_Hard
 * @description
 * */

// serve for comm_service.AlgoUTDataService
type AlgoUTDateOperaInterface interface {
	InsertUTDate(ctx context.Context, utData *db_entity.AlgoUTData) error
	BatchInsertUTDate(ctx context.Context, utData []*db_entity.AlgoUTData) error

	QueryUTDate(ctx context.Context, utData *db_entity.AlgoUTData) (*db_entity.AlgoUTData, error)
	BatchQueryUTDateByIDs(ctx context.Context, ids []int) ([]*db_entity.AlgoUTData, error)
	BatchQueryUTDateByClassNames(ctx context.Context, classNames []string) ([]*db_entity.AlgoUTData, error)

	UpdateUTDate(ctx context.Context, utData *db_entity.AlgoUTData) error
	BatchUpdateUTDate(ctx context.Context, utData []*db_entity.AlgoUTData) error

	DelUTDate(ctx context.Context, utData *db_entity.AlgoUTData) error
	BatchDelUTDateByIDs(ctx context.Context, utData []int) error
}

type AlgoUTDateOpera struct {
	RemoteDB *gorm.DB // 远程数据库 - 主库
	LocalDB  *gorm.DB // 本地数据库 - 从库
}

func NewAlgoUTDateOpera(remoteDB *gorm.DB) *AlgoUTDateOpera {
	return &AlgoUTDateOpera{
		RemoteDB: remoteDB,
		LocalDB:  nil,
	}
}

func (a *AlgoUTDateOpera) InsertUTDate(ctx context.Context, utData *db_entity.AlgoUTData) error {
	return nil
}

func (a *AlgoUTDateOpera) BatchInsertUTDate(ctx context.Context, utData []*db_entity.AlgoUTData) error {
	return nil
}

func (a *AlgoUTDateOpera) QueryUTDate(ctx context.Context, utData *db_entity.AlgoUTData) (*db_entity.AlgoUTData, error) {
	return nil, nil
}

func (a *AlgoUTDateOpera) BatchQueryUTDateByIDs(ctx context.Context, ids []int) ([]*db_entity.AlgoUTData, error) {
	return nil, nil
}

func (a *AlgoUTDateOpera) BatchQueryUTDateByClassNames(ctx context.Context, classNames []string) ([]*db_entity.AlgoUTData, error) {
	return nil, nil
}

func (a *AlgoUTDateOpera) UpdateUTDate(ctx context.Context, utData *db_entity.AlgoUTData) error {
	return nil
}

func (a *AlgoUTDateOpera) BatchUpdateUTDate(ctx context.Context, utData []*db_entity.AlgoUTData) error {
	return nil
}

func (a *AlgoUTDateOpera) DelUTDate(ctx context.Context, utData *db_entity.AlgoUTData) error {
	return nil
}

func (a *AlgoUTDateOpera) BatchDelUTDateByIDs(ctx context.Context, ids []int) error {
	return nil
}
